package uk.ac.ebi.bioinvindex.model.impl.xref;

import uk.ac.ebi.bioinvindex.model.impl.HasReferencesImpl;
import uk.ac.ebi.bioinvindex.model.impl.InvestigationImpl;

import javax.persistence.*;

/**
 *
 * @author brandizi
 */
@Entity
public class InvestigationXrefImpl extends XrefImpl<InvestigationImpl>{

	public InvestigationXrefImpl () {
	}

	public InvestigationXrefImpl ( String acc ) {
		this.setAcc ( acc );
	}

	@ManyToOne(targetEntity = uk.ac.ebi.bioinvindex.model.impl.InvestigationImpl.class)
  @JoinColumn(name = "investigation_id", nullable = true)
	public HasReferencesImpl getOwner () {
		return super.getOwner ();
	}

	@OneToOne ( targetEntity = ReferenceSourceImpl.class, cascade=CascadeType.ALL )
	public ReferenceSourceImpl getSource () {
		return super.getSource();
	}

}
